package com.yaojianfeng.doubancrawler.service;import com.yaojianfeng.doubancrawler.crawler.DoubanCrawler;import com.yaojianfeng.doubancrawler.entity.Movie;import com.yaojianfeng.doubancrawler.mapper.MovieMapper;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import java.util.List;@Servicepublic class DoubanCrawlerService {    @Autowired    private MovieMapper movieMapper;    public void crawlAndSave() {        DoubanCrawler crawler = new DoubanCrawler();        List<Movie> movies = crawler.crawlTop250();        for (Movie movie : movies) {            movieMapper.insertMovie(movie);        }    }}